package vis.core.domain.db;

import vis.core.common.mybatis.DbFieldInsert;
import vis.core.common.mybatis.DbFieldSet;
import vis.core.common.mybatis.DbFieldUpdate;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;

/**
 * 系统菜单表
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(value = "sys_menu", onUpdate = DbFieldUpdate.class, onInsert = DbFieldInsert.class, onSet = DbFieldSet.class)
public class SysMenu extends ZBEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    //PID
    private String pid;

    //菜单名称
    private String name;

    //当前层级，根节点=0
    private String level;

    //层级全路径，JSON字符串数组
    private String treePath;

    //菜单类型 D=目录；M=菜单 ；F=功能
    private String type;

    //功能对应的KEY
    private String functionKey;

    //路由地址
    private String routePath;

    //文件路径
    private String filePath;

    //菜单图标
    private String icon;

    //路由参数
    private String param;

    //外链类型；0非链接，1内部展示，2外部跳转，默认0
    private String linkType;

    //外链地址
    private String linkUrl;

    //是否缓存（0缓存 1不缓存）
    private String isCache;

    //是否展示（0显示 1隐藏）
    private String isShow;

    //是否停用（0正常 1停用）
    private String isDisable;

    //排序
    private int sort;

    //备注
    private String remark;

    //资源集合；逗号分隔
    private String res;

    //排除资源；逗号分隔
    private String resExclude;

}
